# -*- coding: utf-8 -*-
from django.conf.urls.defaults import *
from django.contrib.auth.decorators import login_required
from vacations.views import edit_vacations, VacList, add_update, vac_start, add_access, vac_view, excel_vacations

urlpatterns = patterns('',
    url(r'^edit/(?P<u_id>\d+)/$', login_required(edit_vacations), name="vacations_edit"),
    url(r'^list/(?P<pk>[-\w]+)/$', login_required(VacList.as_view()), name="vacations_by_employee"),
    url(r'^add_update/(?P<pk>[-\w]+)/$', login_required(add_update), name="add_update"),
    url(r'^$', login_required(vac_start), name="v_start"),
    url(r'^add_a/$', login_required(add_access), name="vac_access"),
    url(r'^listing/(?P<u_id>\d+)/(?P<year>[-\w]+)/$', login_required(vac_view), name="vac_list_year"),
    url(r'^export/(?P<arg>[-\w]+)/$', login_required(excel_vacations), name="export"),
)